In [9]:
import numpy as np
import scipy as sp
import scipy.misc as spm
from scipy.linalg import kron
from numpy import linalg as LA

import plotly.plotly as py
import plotly.graph_objs as go
import plotly.tools as tls
from plotly.offline import download_plotlyjs, init_notebook_mode, iplot
init_notebook_mode()

import sys, os
from IPython.display import Image
#sys.path.append('/home/eleonard/src/Simulation-Projects')

# Some constants
from scipy.constants import pi
phi0 = sp.constants.physical_constants['mag. flux quantum'][0]


A transmon as an unbiased phase qubit

Original notes from T.T. here.

The circuit below indicates the relevant parameters needed for analysis. Each item is labeled twice to make discussing the variable transformation from writing a basic circuit Lagrangian $(V, I_0, C)$ to a more relevant set of variables $(\dot{\delta}, E_J, E_C)$ easier. The relationship between each of the sets is given below. It's also worth noting that the capacitance $C$ is the sum total to ground via both the shunt and self capacitance of the junction.


In [10]:
Image(filename='images/transmon.png')


Out[10]:
\begin{align} \dot{\delta} &= V\\ E_J &= \frac{I_0\Phi_0}{2\pi}\\ E_C &= \frac{e^2}{2C} \end{align}

In [11]:
phases=np.linspace(-pi,pi,101)
labels = [r"$-\pi$", r"$0$", r"$\pi$"]
PE_exact=go.Scatter(
                x=phases,
                y=[-np.cos(y) for y in phases],
                mode='lines',
                name='Exact Potential'
            )
PE_approx=go.Scatter(
                x=phases,
                y=[y**2/sp.special.factorial(2)-1 for y in phases],
                mode='lines',
                name='2nd Order Approx.'
            )
PE_fourth=go.Scatter(
                x=phases,
                y=[y**2/sp.special.factorial(2) - 1
                 - y**4/sp.special.factorial(4) for y in phases],
                mode='lines',
                name='4th Order Approx.'
            )
PE_layout={'title':'Transmon Potential Energy',
           'xaxis':{'title':'$\\text{Phase }\delta$',
                    'ticks':"",
                    'showticklabels':True,
                    'mirror':True,
                    'ticktext':labels,
                    'tickvals':[-pi,0,pi]
                   },
           'yaxis':{'title':'$\\text{Junction Energy }E_J$',
                    'range':[-1,1]}
        }
PE_fig = dict(data=[PE_exact, PE_approx, PE_fourth], layout=PE_layout)
#iplot(PE_fig)
#py.iplot(PE_fig, filename='transmon-notes PE plot')
tls.embed('https://plot.ly/~iamed18/13/transmon-potential-energy/')


Out[11]:

In [12]:
test=np.array([[0,1]])
iden=np.identity(10)
#print(kron(test,iden))
dim=2
vec=np.zeros(dim)

In [13]:
def ketBra(dim, i, j):
    vec_i=np.zeros(dim)
    vec_j=np.zeros(dim)
    vec_i[i]=1
    vec_j[j]=1
    return kron(np.array([vec_i]).T,np.array([vec_j]))

def H(dim,n,a):
    shift=int((dim-1)/2)
    total=0
    for j in n[:-1]:
        total += 4*n**2*ketBra(dim,j+shift,j+shift) - a/2. * (ketBra(dim,j+1+shift,j+shift) + ketBra(dim,j-1+shift,j+shift))
    return total

In [22]:
dim=11
pairs = np.linspace(-5, 5, 11, dtype=int)
alpha=0.1
ham=H(dim,pairs,alpha)
# print(ham)
val,vec = LA.eig(ham)
idx=val.argsort()[::1]
energy=val[idx]
functions=vec[:,idx]
# print(energy)

In [23]:
scatters = []
scatters.append(go.Scatter(
                    x=pairs,
                    y=functions[:,0],
                    mode='lines',
                    name='Ground State'
))

scatters.append(go.Scatter(
                    x=pairs,
                    y=functions[:,2],
                    mode='lines',
                    name='First Excited State'
))

scatters.append(go.Scatter(
                    x=pairs,
                    y=functions[:,3],
                    mode='lines',
                    name='Second Excited State'
))

    
CP_layout={'title':'Eigenfunctions for $E_J/E_C=0.1$',
           'xaxis':{'title':'Number of Cooper Pairs on Island',
                    'tickvals':np.linspace(-5,5,11)},
           'yaxis':{'title':'$\psi$'}
        }

fig = dict(data=scatters, layout=CP_layout)
iplot(fig)



In [ ]: